#!/bin/bash
echo $1
target=$1
rm tags
if [ ! -n $target ];then
	echo "no target"
	echo "100"
	echo "400"
	echo "600"
	exit
fi
echo $target
if [ "$target" == "100" ] ;then	
	echo create tms100 tags
	ctags -R --c++-kinds=+p --fields=+ialS --extra=+q --exclude=protocol-400/*.* --exclude=schedule-400/*.* \
		--exclude=tr700-algo --exclude=protocol-600/*.* --exclude=schedule-600/*.* 
elif [ "$target" == "400" ];then 
	echo create tms400 tags
	ctags -R --c++-kinds=+p --fields=+ialS --extra=+q --exclude=protocol/*.* --exclude=schedule/*.*\
		--exclude=tr600plus-algo/*.* --exclude=protocol-600/*.* --exclude=schedule-600/*.*
elif [ "$target" == "600" ];then 
	echo create tms600 tags
	ctags -R --c++-kinds=+p --fields=+ialS --extra=+q --exclude=protocol/*.* --exclude=schedule/*.*\
		--exclude=tr600plus-algo/*.* --exclude=protocol-400/*.* --exclude=schedule-400/*.*
fi
echo ok
